/**
 * Created by Skye on 2018/3/22.
 */
export const SET_USER_INFO = 'SET_USER_INFO';
export const SET_ACCOUNT_LIST = 'SET_ACCOUNT_LIST';
export const COLLAPSED = 'COLLAPSED';
export const SET_MENU_LIST = 'SET_MENU_LIST';

export const initialState = {
  userInfo: {
    userName: 'guest'
  },
  accountList: [],
  collapsed: false,
  menuList: []
}

export function setUserInfo(userInfo) {
  return {
    type: SET_USER_INFO,
    userInfo
  }
}

export function setAccountList(accountList) {
  return {
    type: SET_ACCOUNT_LIST,
    accountList
  }
}

export function collapsed(collapsed) {
  return {
    type: COLLAPSED,
    collapsed
  }
}

export function setMenuList(menuList) {
  return {
    type: SET_MENU_LIST,
    menuList
  }
}